﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Pickle.Euler
{
	/// <summary>
	/// 
	/// </summary>
	public abstract class BaseProblem : IEulerProblem
	{
		/// <summary>
		/// Project Euler.net problem number.
		/// </summary>
		public int ProblemNumber { get; protected set; }

		/// <summary>
		/// The question posed by the problem.
		/// </summary>
		public string Question { get; protected set; }

		/// <summary>
		/// The answer to the problem.
		/// </summary>
		public virtual string Answer { get { return "Unanswered"; } }

		/// <summary>
		/// 
		/// </summary>
		/// <returns></returns>
		public override string ToString()
		{
			return "----------------------------------" + Environment.NewLine
				+ "Problem Number: " + ProblemNumber + Environment.NewLine
				+ "Question:" + Environment.NewLine + Question + Environment.NewLine
				+ Environment.NewLine + "Answer: " + Answer + Environment.NewLine
				+ "----------------------------------" + Environment.NewLine;
		}
	}
}
